<!DOCTYPE html>
<html lang="en">
<#import "../common/userLayout.ftl" as layout/>
<@layout.head title=""></@layout.head>
<head>
    <title>资产查询</title>
    <link rel="stylesheet" type="text/css" href="${request.contextPath}/assets/user/skinA/css/page/search.css?v=3653060703">
    <script src="${request.contextPath}/assets/user/js/page/search.js?v=3653060703"></script>
</head>
<body>
<div id="background">
    <div class="weui-search-bar" id="searchBar">
        <form class="weui-search-bar__form" action="javascript:return true;">
            <div class="weui-search-bar__box">
                <i class="weui-icon-search"></i>
                <input type="search" class="weui-search-bar__input" id="searchInput" placeholder="请将关键词用空格隔开进行搜索"
                       required="">
                <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
            </div>
            <label class="weui-search-bar__label" id="searchText"
                   style="transform-origin: 0px 0px 0px; opacity: 1; transform: scale(1, 1);">
                <i class="weui-icon-search"></i>
                <span>搜索</span>
            </label>
        </form>
        <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
    </div>

    <div id="searchBox" class="TA">
        <div class="exampleBox">
            <div class="weui-loadmore weui-loadmore_line">
                <span class="weui-loadmore__tips">按资产搜索：品牌/型号/二维码/状态/使用类型/领用日期</span>
            </div>
            <div class="examples" searchPage="0">
                <span class="example">惠普 打印机</span>
                <span class="example">联想 电脑 V330</span>
                <span class="example">打印机 维修中</span>
                <span class="example">打印机 个人使用</span>
                <span class="example">打印机 2020-5-10</span>
            </div>
            <div class="weui-loadmore weui-loadmore_line">
                <span class="weui-loadmore__tips">按使用人搜索：部门/人名/电话/小号/出生日期</span>
            </div>
            <div class="examples" searchPage="1">
                <span class="example">办公室</span>
                <span class="example">办公室 张三</span>
                <span class="example">18688886666</span>
                <span class="example">1234</span>
            </div>
            <div class="weui-loadmore weui-loadmore_line">
                <span class="weui-loadmore__tips">库存搜索：类型/品牌/型号</span>
            </div>
            <div class="examples" searchPage="2">
                <span class="example">笔</span>
                <span class="example">笔 得力</span>
                <span class="example">联想 电脑</span>
            </div>
            <div class="weui-loadmore weui-loadmore_line">
                <span class="weui-loadmore__tips">按出库单搜索：出库时间/出库单号/申领单号</span>
            </div>
            <div class="examples" searchPage="3">
                <span class="example" id="yesterday">2020-2-01</span>
                <span class="example" id="today">2020-2-01</span>
            </div>
        </div>
        <div class="weui-loadmore weui-loadmore_line" style="margin-top:20px; ">
            <span class="weui-loadmore__tips">资产查看 历史查询记录</span>
        </div>
        <div class="flex" id="history">
            <div class="button noInfo"><span>无查询记录</span></div>
        </div>

        <div id="delete">
            <span class="fa fa-trash"> 清除查询记录</span>
        </div>
    </div>

    <div id="searchResult">
        <div class="tabBox" id="tabBt">
            <div class="tabButtons">
                <div class="tabButton TA">资产查询</div>
                <div class="tabButton TA">部门/人员</div>
                <div class="tabButton TA">当前库存</div>
                <div class="tabButton TA">库存变动</div>
            </div>
            <div class="tabBar TA"></div>
        </div>
        <div id="tabPage" class="tabPageBox">
            <div class="pageBox TA">
                <div class="page" id="page0">
                </div>
                <div class="page" id="page1">
                </div>
                <div class="page" id="page2">
                </div>
                <div class="page" id="page3">
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    var serverConst = {
        state: [
        <#list state as item>
            {code: "${item.code}",name:"${item.name}"},
        </#list>],
        secrecy: [
        <#list secrecy as item>
            {code: "${item.code}",name:"${item.name}"},
        </#list>]
    }
    var orgInfo =${organizationName};
    function getOrgName(orgId,orgInfo,supername) {
        if(orgInfo.id==orgId) return supername+" "+orgInfo.name;
        for (var i = 0; i < orgInfo.childrenOrg.length; i++) {
           var name= getOrgName(orgId, orgInfo.childrenOrg[i], supername+" "+orgInfo.name);
           if(name!=null) return name;
        }
    }
</script>
</html>